# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
 
pkgname=graphene
pkgver=1.6.0
pkgrel=1
pkgdesc="A thin layer of graphic data types"
url="https://github.com/ebassi/graphene"
arch=(i686 x86_64)
license=(MIT)
depends=(glib2)
makedepends=(git gtk-doc gobject-introspection meson)
_commit=aa40018fa12905d024b85293ef49bfc7af1b5627  # tags/1.6.0^0
source=("git+https://github.com/ebassi/graphene#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}
 
build() {
  cd build
  export LANG=en_US.UTF-8
  meson --prefix=/usr --buildtype=release ../$pkgname --libexecdir=/usr/lib -Denable-gtk-doc=true
  ninja
}

check() {
  cd build
  ninja test
}
 
package() {
  cd build
  DESTDIR="$pkgdir" ninja install

  cd ../$pkgname
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
